#pragma once
#include <game/Config.h>
#include <game/Service.h>

#include <Atom.h>

ARELLO_GAME_NAMESPACE_DECL_START
namespace services {

class Text 
	: public Service<Text>
{
public:
	const std::wstring& GetText(const liba::Atom& id) 
	{
		static Atom defaultAtom("default");
		return this->DoGetText(defaultAtom, defaultAtom, id);
	}

	const std::wstring& GetText(
		const liba::Atom& chapter, 
		const liba::Atom& section,
		const liba::Atom& id)
	{
		return this->DoGetText(chapter, section, id);
	}
protected:
	virtual const std::wstring& DoGetText(
		const liba::Atom& chapter, 
		const liba::Atom& section,
		const liba::Atom& id) = 0;
};

} // namespace services
ARELLO_GAME_NAMESPACE_DECL_END